from PyQt5.QtWidgets import QWidget, QPushButton, QHBoxLayout

class FunctionButtons(QWidget):
    def __init__(self):
        super().__init__()
        self.buttons = {
            'download': ('下载', '#3276B1'),
            'convert': ('格式转换', '#5B4B8C'),
            'watermark': ('去水印', '#2D7F3D')
        }
        self.init_ui()

    def init_ui(self):
        layout = QHBoxLayout()
        for btn_type, (text, color) in self.buttons.items():
            btn = QPushButton(text)
            btn.setStyleSheet(f"""
                QPushButton {{
                    background: {color};
                    color: white;
                    padding: 8px 16px;
                    border-radius: 4px;
                    min-width: 120px;
                }}
            """)
            layout.addWidget(btn)
        self.setLayout(layout)